//TOWN SCRIPT TEMPLATE

begintownscript;

variables;

body;

beginstate INIT_STATE;
	set_total_visibility(0);	
	message_dialog("You fall through the hole created by the statue and into somewhere dark. You hear grumbling coming from a hoard of Frowney Faces as the swarm you.","You prepare for battle.");
break;

beginstate EXIT_STATE;
break;

beginstate START_STATE;
break;

beginstate 10;
	if(get_flag(3,1)==0){
	message_dialog("You discover a secret passageway.","This must be the way that King Smiley was taken.");
	set_flag(3,1,1);
}
break;

beginstate 11;
	if (get_flag(3,2) == 0) {
		reset_dialog();
		add_dialog_str(0,"You gasp when you round the corner, and see King Smiley and his servants being held hostage by a Frowney Face.",0);
		add_dialog_str(1,"_You must be wondering why this tunnel is here._ it says. You nod.",0);
		add_dialog_str(2,"_We have been digging this tunnel for years so we could launch a surprise attack._",0);
		add_dialog_str(3,"_Seeing as the surprise aspect is lost, I might as well kill you here._ The Frowney attacks.",0);
		add_dialog_choice(0,"(Attack!)");
		run_dialog(1);
		set_attitude(17,10);
		set_flag(3,2,1);
	}
break;

beginstate 12;
	move_to_new_town(5,18,5);
break;